const localStorage = window.localStorage;

function storageApi() {
  return {
    get(key) {
      return localStorage.getItem(key);
    },
    set(key, val) {
      localStorage.setItem(key, val);
    },
  };
}

export default storageApi();
